//include "stdafx.h"
//#include "ScriptInterpreter.h"
#include <winsock2.h>

#include <WS2tcpip.h>


typedef struct DashboardDatatype
{
	float voltage;
};


#include <cstdio>


int printf_wrap(const char* format, ...)
{
	va_list args;
	va_start(args, format);
	int retVal = vprintf(format, args);
	va_end(args);
	return retVal;
}


int main(int argc, char* argv)
{
	printf("%s\n", "hi");
	printf_wrap("The word is %s\n", "hi");


	/*
	WSADATA* data;
	WORD version = MAKEWORD(2, 2);
	int result = WSAStartup(version, 0);

	int _sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
	sockaddr_in addr;
	addr.sin_port = 1165;
	addr.sin_family = AF_INET;

	inet_pton(AF_INET, "192.168.0.155", &addr.sin_addr);

	connect(_sock, (sockaddr*) &addr, sizeof addr);

	DashboardDatatype d;

	char buf[sizeof(DashboardDatatype)];

	while(true)
	{
		for(float i = 0; i < 50; i++)
		{
			d.voltage = i;
			memcpy(buf, &d, sizeof(d));
			send(_sock, buf, 4, 0);
			Sleep(1000);
		}
	}*/
}